package com.andyou.modules.content.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.andyou.common.persistence.Page;
import com.andyou.common.service.CrudService;
import com.andyou.modules.content.entity.ContentStatDay;
import com.andyou.modules.content.dao.ContentStatDayDao;

/**
 * 统计日汇总（content_stat_day）Service
 * @author lgx
 * @version 2020-03-11
 */
@Service
@Transactional(readOnly = true)
public class ContentStatDayService extends CrudService<ContentStatDayDao, ContentStatDay> {

	public ContentStatDay get(String id) {
		return super.get(id);
	}
	
	public List<ContentStatDay> findList(ContentStatDay contentStatDay) {
		return super.findList(contentStatDay);
	}
	
	public Page<ContentStatDay> findPage(Page<ContentStatDay> page, ContentStatDay contentStatDay) {
		return super.findPage(page, contentStatDay);
	}
	
	@Transactional(readOnly = false)
	public int save(ContentStatDay contentStatDay) {
		return super.save(contentStatDay);
	}
	
	@Transactional(readOnly = false)
	public void delete(ContentStatDay contentStatDay) {
		super.delete(contentStatDay);
	}
	
	
    @Transactional(readOnly = false)
	public void batchDelete(List<String> idList) {
		ContentStatDay contentStatDay = null;
		for (String id : idList) {
			contentStatDay = new ContentStatDay();
			contentStatDay.setId(id);
			super.delete(contentStatDay);
		}
	}
}